﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

/* Generated  */
namespace EDMXParserV1
{
        [Serializable]
    public class ComplexType
    {
        public ComplexType()
        {
            Properties = new List<Property>();
        }
        public String Name { get; set; }

        public List<Property> Properties { get; set; }

        public static ComplexType New(System.Xml.XmlNode Node)
        {
            ComplexType ComplexType = new ComplexType();

            foreach (XmlAttribute Attribute in Node.Attributes)
            {
                switch (Attribute.Name)
                {
                    case "Name":
                        ComplexType.Name = Attribute.Value;
                        break;
                    default:
                        Globals.AttributeSwitchCoder(Attribute);
                        break;
                }

            }

            foreach (XmlNode ChildNode in Node.ChildNodes)
            {
                switch (ChildNode.Name)
                {
                    case "Property":
                        Property Property = Property.New(ChildNode);
                        ComplexType.Properties.Add(Property);
                        break;
                    default:
                        Globals.NodeSwitchCoder(ChildNode);
                        break;
                }
            }

            return ComplexType;
        }
    }
}
